package top.xiaoazi.futureletterserver.module.user.vo;

import lombok.Data;
import top.xiaoazi.futureletterserver.module.user.entity.User;
import top.xiaoazi.futureletterserver.module.user.impl.UserImpl;

@Data
public class UserRedisVO implements UserImpl {
    private Integer userId;
    private String username;
    private String nickName;
    private String userImg;
    private Integer balance;
    private String synopsis;
    private String createTime;
    private String email;
    private String password;


    public UserRedisVO(User user) {
        this.userId = user.getUserId();
        this.username = user.getUsername();
        this.nickName = user.getNickName();
        this.userImg = user.getUserImg();
        this.balance = user.getBalance();
        this.synopsis = user.getSynopsis();
        this.createTime = user.getCreateTime();
        this.email = user.getEmail();
        this.password = user.getPassword();
    }

//    public UserRedisVO(@JsonProperty("userId")Integer userId,
//                       @JsonProperty("username")String username,
//                       @JsonProperty("nickName")String nickName,
//                       @JsonProperty("userImg")String userImg,
//                       @JsonProperty("balance")Integer balance,
//                       @JsonProperty("synopsis")String synopsis,
//                       @JsonProperty("createTime")String createTime) {
//        this.userId = userId;
//        this.username = username;
//        this.nickName = nickName;
//        this.userImg = userImg;
//        this.balance = balance;
//        this.synopsis = synopsis;
//        this.createTime = createTime;
//    }
    public UserRedisVO() {}
}
